home *** CD-ROM | disk | FTP | other *** search
/ PsL Monthly 1993 December / PSL Monthly Shareware CD-ROM (December 1993).iso / prgmming / win / vb / spin.exe / SPIN.INF < prev    next >
Encoding:
Text File  |  1991-12-11  |  2.0 KB  |  40 lines

  1.             Jeffrey Richter's Spin Button
  2.     adapted and posted by Costas Kitsos with Mr. Richter's permission
  3.  
  4. Jeffrey Richter's "Windows 3: A Developer's Guide" is one of the best books on
  5. Windows programming I have come across.  Ever since I bought it, it has been
  6. a constant source of information, inspiration and a breath of fresh air in the
  7. mind boggling world of Windows Programming.  Mr. Richter's book is packed with
  8. programming examples, EXEs, DLLs, discussions and explanations on some of the
  9. most intricate aspects of taming Windows Programming.
  10.  
  11. One of the gems in the book is Mr. Richter's Spin Button Control.  A Spin 
  12. Button Control is familiar to most Windows users.  It's the little control
  13. with the Up/Down arrows one finds in Apps like the Control Panel's Color
  14. setting Dialog.  Mr. Richter's Spin Button Control uses a very elegant 
  15. technique to monitor the status of the left mouse button without the need for
  16. a Timer.
  17.  
  18. SPIN.MAK contains an adaptation of Mr. Richter's Spin Button for Visual Basic.
  19. Since VB offers built in support for using Picture controls I used three 
  20. bitmaps (9 x 22 pixels) for the three possible states of the Spin Button.  
  21. Each bitmap is only 294 bytes.  The demo is a simple Color "Maker" App.  It 
  22. allows the user to select Red, Green and Blue color values (from 0 to 255) 
  23. and use these to "create" a color.  The initial values are set in the mid
  24. range of each color: 128.  The code for monitoring the status of the Spin
  25. Button can be found in the SpinButton() MouseDown procedure.  I tried to add
  26. comments to the code to ease the understanding of Mr. Richter's technique but
  27. for the full explanation and an abundance of examples on Programming Windows
  28. please see:
  29.  
  30.     Windows 3: A Developer's Guide by Jeffrey M. Richter
  31.     M&T Books 501 Galveston Drive  Redwood City, CA 94603
  32.     (800) 533-4372 (in California call (800) 356-2002)
  33.     ISBN 1-55851-162-8 (Book only) ISBN 1-55851-164-4 (Book/Disk)
  34.  
  35. Enjoy,
  36.  
  37. Costas Kitsos
  38. CIS 73667,1755
  39.  
  40. P.S. To ease inquiring minds I am not affiliated with Mr. Richter or M&T Books.